# Contributor: omni <omni@gitlab.alpinelinux.org>
# Maintainer: omni <omni@gitlab.alpinelinux.org>
pkgname=uni
pkgver=2.6.0
pkgrel=0
pkgdesc="Query the Unicode database from the commandline"
url="https://github.com/arp242/uni"
license="MIT"
arch="all"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/arp242/uni/archive/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v .
}

check() {
	go test ./...
}

package() {
	install -Dm755 uni -t "$pkgdir"/usr/bin
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
d946a4784c4a5290b26eea358a5f3ca3e2b078a9c1b54a0ddf47fce104f147013c11f20be6346a9846dbf6f15009377093dabfef86a020665e42eb48f65634a5  uni-2.6.0.tar.gz
"
